<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
    'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
    'name'=>'Private Sale',
	
    // preloading 'log' component
    'preload'=>array('log'),

    // autoloading model and component classes
    'import'=>array(
        'application.models.*',
        'application.models.forms.*',
        'application.components.*',
        'application.vendor.mailchimp.Mailchimp',
    ),

    'modules'=>array(
        'admin',
    ),

    // application components
    'components'=>array(

        'user'=>array(
            // enable cookie-based authentication
            'allowAutoLogin'=>true,
        ),    
        
		'db'=>array(
            'connectionString' =>'mysql:host=localhost;dbname=xemphimf_privatesale',
            'emulatePrepare' => true,
            'enableParamLogging' => true,
            'tablePrefix' => 'dtb_',
            'username' => 'xemphimf_private',
            'password' => '96Tnn-DD5X?8',
            'charset' => 'utf8',
        ),

        'errorHandler'=>array(
            // use 'site/error' action to display errors
            'errorAction'=>'site/error',
        ),

        'log'=>array(
            'class'=>'CLogRouter',
            'routes'=>array(
                array(
                    'class'=>'CFileLogRoute',
                    'levels'=>'error, warning',
                ),
                // uncomment the following to show log messages on web pages
                // array('class'=>'CWebLogRoute'),
            ),
        ),
    ),
    'defaultController' => 'm',
    // application-level parameters that can be accessed
    // using Yii::app()->params['paramName']
    'params'=>array(
    	'mailchimp'=>array(
			'api'=>'be1b6caf9c90b4681e886b4debdf4ab8-us3',
			'listid'=>'f849532a85',//list id to sync
    		'urlpost'=>'http://itk.us3.list-manage.com/subscribe/post?u=0546712e5b7f03e315f581652&amp;id=f849532a85',
    		'urlpostjson'=>'http://itk.us3.list-manage.com/subscribe/post-json?u=0546712e5b7f03e315f581652&id=f849532a85&c=?',
		),
        // this is used in contact page
        'adminEmail'=>'quangnghia@happyliving.vn',
        'VISIBLE_OFF' => 0,
        'VISIBLE_ON'  => 1,
        'DEL_FLG_OFF' => 0,
        'DEL_FLG_ON'  => 1,
        'ArrVisible'        => array(0=>'Hidden',1=>'Show'),
        'ArrDelFlg'         => array(0=>'Normal',1=>'Deleted'),
        'ArrReadStatus'     => array(0=>'Unread',1=>'Read'),
        'ArrDefault'        => array(0=>'Not default',1=>'Default'),
        'UserActiveStatus'  => array(0=>'Inactive',1=>'Active'),
        'LastUseRange' => array(
            0 => '1 week ago',
            1 => '2 weeks ago',
            2 => '3 weeks ago',
            3 => '1 month ago',
            4 => '2 months ago',
            5 => '4 months ago',
            6 => '6 months ago',
            7 => '8 months ago',
            8 => '10 months ago',
            9 => '1 year ago',
            10 => '2 years ago',
            11 => '3 years ago',
            12 => '4 years ago',
        ),
        'OrderStatuses' => array(
            0 => 'New',
            1 => 'Processing',
            3 => 'Cancelled',
            4 => 'Completed',
            5 => 'Returned',
        ),
        'OrderShippingStatuses' => array(
            0 => 'Unshipped',
            1 => 'Shipping',
            3 => 'Shipped',
        ),
        'OrderPaymentStatuses' => array(
            0 => 'Unpaid',
            1 => 'Paid',
        ),
    ),
);